package com.bamanker.cloudconsumer.feign;

import com.bamanker.cloudapi.domain.toEmail;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * @author bamanker
 */
@Component
@FeignClient(value = "nacos-sys",contextId = "EmailClient")
public interface EmailClient {


    @GetMapping("/manager/toEmails")
    public Object list(@RequestParam("start") int start,
                                @RequestParam("size") int size);

    @GetMapping("/manager/toEmails/{id}")
    public Object get(@PathVariable("id") int id);

    @PostMapping("/manager/toEmails")
    public Object add(@RequestBody toEmail t);

    @DeleteMapping("/manager/toEmails/{id}")
    public Object delete(@PathVariable("id") Long id);

    @PutMapping("/manager/toEmails")
//    @SaCheckPermission(value = "user.update")
    public Object update(@RequestBody toEmail t);

}
